package com.cly.statistics;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * 折线/柱状图统计对象
 *
 * @author by 春风能解释
 * <p>
 * 2024/10/15
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@Schema(name = "折线图统计对象")
public class LineStatistics<X, Y> implements Serializable {

    /**
     * 序列化版本号
     */
    @Serial
    private static final long serialVersionUID = -6628706737092111903L;

    /**
     * 标题
     */
    @Schema(description = "标题")
    private String title;

    /**
     * 横坐标
     */
    @Schema(description = "横坐标")
    private List<X> xAxis;

    /**
     * 纵坐标
     */
    @Schema(description = "纵坐标")
    private List<Y> yAxis;

    /**
     * 数据
     */
    @Schema(description = "数据")
    private List<Y> data;
}
